<?php
require_once 'modules/content/models/Content.php';
class default_IndexController extends Nine_Controller_Action
{
	public function indexAction()
	{
		$this->setLayout('home');
		$this->view->headTitle(Nine_Language::translate('Home'));
		$this->view->menuId = array('home','');
		
		/**
		 * Get content URL
		 */
		$objContent = new Models_Content();
		$cat['content_category_gid'] = 1;
		$condition = null;
		$allContents = $objContent->getAllEnabledContentByCategory(0,$cat['content_category_gid'], $condition, 
                                                                        array('sorting ASC'));
//             $i = 0;    
//             foreach ($allContents as &$item) {
//             	$i++;
//             	$item['num'] = $i;
//             	$item['url'] = Nine_Route::_("content/index/detail/id/{$item['content_gid']}",array('alias' => $item['alias']));
//             }
//             unset($item);
            $this->view->allContents = $allContents;
		
		
	
		
		
	}
	
}